package com.lin.chapter11;

import java.util.ArrayList;
import java.util.List;

public class Director {
	private List<String> sequence = new ArrayList<>();
	private BenzBuilder benzBuilder = new BenzBuilder();
	private BMWBuilder bmwBuilder = new BMWBuilder();

	public CarModel getABenzModel(){
		this.sequence.clear();
		this.sequence.add("start");
		this.sequence.add("stop");
		this.benzBuilder.setSequence(sequence);
		return this.benzBuilder.getCarModel();
	}

	public CarModel getCBMWModel(){
		this.sequence.clear();
		this.sequence.add("alarm");
		this.sequence.add("start");
		this.sequence.add("stop");
		this.bmwBuilder.setSequence(this.sequence);
		return this.bmwBuilder.getCarModel();
	}
}
